home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcr / pcr4_4.lha / DIST / debugnub / INCLUDE / xr / CirioNubProcs.h < prev    next >
C/C++ Source or Header  |  1992-03-04  |  9KB  |  436 lines

  1. /* begincopyright
  2.   Copyright (c) 1988 Xerox Corporation. All rights reserved.
  3.   Use and copying of this software and preparation of derivative works based
  4.   upon this software are permitted. Any distribution of this software or
  5.   derivative works must comply with all applicable United States export
  6.   control laws. This software is made available AS IS, and Xerox Corporation
  7.   makes no warranty about the software, its performance or its conformity to
  8.   any specification. Any person obtaining a copy of this software is requested
  9.   to send their name and post office or electronic mail address to:
  10.     PCR Coordinator
  11.     Xerox PARC
  12.     3333 Coyote Hill Rd.
  13.     Palo Alto, CA 94304
  14.   endcopyright */
  15.  
  16. /*
  17.  * CirioNubProcs.h
  18.  *
  19.  * Demers, February 25, 1992 1:45:55 pm PST
  20.  *
  21.  * CirioNub remote procedure numbers and descriptions.
  22.  */
  23.  
  24. #ifndef _CIRIO_NUB_PROCS_
  25. #define _CIRIO_NUB_PROCS_
  26.  
  27. #include "xr/CirioNubProtocol.h"
  28.  
  29. /*
  30.  * Client CirioNubProcs
  31.  */
  32.  
  33.  
  34. #define CIRIO_NUB_PROCS_LOW_VERSION 5
  35. #define CIRIO_NUB_PROCS_VERSION    7
  36.  
  37.  
  38. /*
  39.     unsigned Null ( unsigned desiredVersion );
  40.  
  41.     Return the "best" Cirio nub version number exported by this nub.
  42. */
  43.  
  44. extern CirioNubRetCode
  45. CirioNubServeNull(/* int argc, unsigned *args */);
  46.  
  47. #define CirioNubProcID_Null            0
  48.  
  49. /*
  50.     struct { bool sigWasReceived; XR_DBStat dbStat }
  51.     WaitSig ( unsigned timeoutMsec );
  52.  
  53.     Wait at most timeoutMsec milliseconds for signal from debugee to nub.
  54. */
  55.  
  56. extern CirioNubRetCode
  57. CirioNubServeWaitSig(/* int argc, unsigned *args */);
  58.  
  59. #define CirioNubProcID_WaitSig        1
  60.  
  61.  
  62. /*
  63.     int SetDBStat ( XR_DBStat stat, unsigned timeoutMsec );
  64.     
  65.     Set DBStat of debuggee world (all processors).
  66.     Debuggee may refuse; try for no more than the specified time.
  67.     Return ( (success) ? 0 : -1 )
  68. */
  69.  
  70. extern CirioNubRetCode
  71. CirioNubServeSetDBStat(/* int argc, unsigned *args */);
  72.  
  73. #define CirioNubProcID_SetDBStat    2
  74.  
  75. /*
  76.     Block8 GetBytes ( char *addr, int nBytes ); 
  77.  
  78.     Read from debuggee address space.
  79.     Return ( (success) ? desired bytes : a null block )
  80. */
  81.  
  82. extern CirioNubRetCode
  83. CirioNubServeGetBytes(/* int argc, unsigned *args */);
  84.  
  85. #define CirioNubProcID_GetBytes        3
  86.  
  87.  
  88. /*
  89.     int PutBytes ( char *addr, Block8 bytes );
  90.  
  91.     Write into debuggee address space.
  92.     Return ( (success) ? 0 : nonzero )
  93. */
  94.  
  95. extern CirioNubRetCode
  96. CirioNubServePutBytes(/* int argc, unsigned *args */);
  97.  
  98. #define CirioNubProcID_PutBytes        4
  99.  
  100.  
  101. /*
  102.     Block16 GetWords16 ( char *addr, int nBytes ); 
  103.  
  104.     Read from debuggee address space.
  105.     Return ( (success) ? desired bytes : a null block )
  106. */
  107.  
  108. extern CirioNubRetCode
  109. CirioNubServeGetWords16(/* int argc, unsigned *args */);
  110.  
  111. #define CirioNubProcID_GetWords16    5
  112.  
  113.  
  114. /*
  115.     int PutWords16 ( char *addr, Block16 bytes );
  116.  
  117.     Write into debuggee address space.
  118.     Return ( (success) ? 0 : nonzero )
  119. */
  120.  
  121. extern CirioNubRetCode
  122. CirioNubServePutWords16(/* int argc, unsigned *args */);
  123.  
  124. #define CirioNubProcID_PutWords16    6
  125.  
  126.  
  127. /*
  128.     Block32 GetWords32 ( char *addr, int nBytes ); 
  129.  
  130.     Read from debuggee address space.
  131.     Return ( (success) ? desired bytes : a null block )
  132. */
  133.  
  134. extern CirioNubRetCode
  135. CirioNubServeGetWords32(/* int argc, unsigned *args */);
  136.  
  137. #define CirioNubProcID_GetWords32    7
  138.  
  139.  
  140. /*
  141.     int PutWords32 ( caddr_t addr, Block32 bytes );
  142.  
  143.     Write into debuggee address space.
  144.     Return ( (success) ? 0 : nonzero )
  145. */
  146.  
  147. extern CirioNubRetCode
  148. CirioNubServePutWords32(/* int argc, unsigned *args */);
  149.  
  150. #define CirioNubProcID_PutWords32    8
  151.  
  152.  
  153. /*
  154.     <block of struct CirioNubThreadDataRep>
  155.     GetThreads ( int low, int high );
  156.  
  157.     Return a struct CirioNubThreadDataRep for each active thread in range.
  158.  
  159.     Special Case: if (low < 0) return struct CirioNubThreadDataRep for
  160.       thread whose index is (-low), whether active or not.  If (-low) is
  161.       out of range, return an empty block.  Note high is ignored in this case.
  162. */
  163.  
  164.  
  165. extern CirioNubRetCode
  166. CirioNubServeGetThreads(/* int argc, unsigned *args */);
  167.  
  168. #define CirioNubProcID_GetThreads    9
  169.  
  170. /*
  171.     struct CirioNubPCInfoRep
  172.     PCtoInfo ( caddr_t addr );
  173.  
  174.     Map absolute pc to info.
  175. */
  176.  
  177. extern CirioNubRetCode
  178. CirioNubServePCtoInfo(/* int argc, unsigned *args */);
  179.  
  180. #define CirioNubProcID_PCtoInfo        10
  181.  
  182. /*
  183.     void KillWorld ( );
  184.  
  185.     Kill the PCR world, cleaning up as much as possible.
  186.     Breaks the Cirio connection after returning.
  187. */
  188.  
  189. extern CirioNubRetCode
  190. CirioNubServeKillWorld( );
  191.  
  192. #define CirioNubProcID_KillWorld        11
  193.  
  194.  
  195. /*
  196.     Remote file I/O, WITHDRAWN:        12 ... 17
  197. */
  198.  
  199.  
  200. /*
  201.     int IssueThreadCommand (
  202.         int threadIndex,
  203.         bool setFreeze, bool freeze,
  204.         bool setMsg, int msg
  205.     );
  206.     
  207.     Set dbFreeze and dbMsg fields of specified thread.
  208.     Return ( success ? 0 : nonzero ).
  209. */
  210.  
  211. extern CirioNubRetCode
  212. CirioNubServeIssueThreadCommand( );
  213.  
  214. #define CirioNubProcID_IssueThreadCommand    18
  215.  
  216.  
  217. /*
  218.     struct { int dbStat, int examineeIndex; }
  219.     GetDBStat ( int oldstat, int oldExamineeIndex, unsigned timeoutMsec );
  220.  
  221.     Return system dbStat value and index of thread currently being
  222.       examined (for dbx).  Index < 0 ==> no thread being examined.
  223.     Wait for the values to change from the old values, or for timeout.
  224. */
  225.  
  226. extern CirioNubRetCode
  227. CirioNubServeGetDBStat( );
  228.  
  229. #define CirioNubProcID_GetDBStat        19
  230.  
  231.  
  232. /*
  233.  * For the following procs, consult IncrementalLoad.h
  234.  */
  235.  
  236.  
  237. /*
  238.     struct CirioNubFileEntryRep
  239.     GetFileEntry ( unsigned seqNum );
  240.  
  241.     Return file entry with largest seqNum <= the specified one.
  242.     Claim: can't fail.
  243. */
  244.  
  245. extern CirioNubRetCode
  246. CirioNubServeGetFileEntry( );
  247.  
  248. #define CirioNubProcID_GetFileEntry        20
  249.  
  250.  
  251. /*
  252.     Procs 21 - 25 are OBSOLETE and will be withdrawn soon ...
  253.       use procs 26-27 instead.
  254.  
  255.     January 12, 1990 1:01:18 pm PST
  256.     
  257.     
  258.     Isn't it amazing that "soon" still hasn't come?! - ajd
  259.     March 3, 1992 6:41:33 pm PST
  260.  
  261. */
  262.  
  263. /*
  264.  
  265.     struct LookupSymEntryResultRep {
  266.         int errCode;
  267.         union(errCode) {
  268.             case 0: struct SymEntry symEntry;
  269.             default: void
  270.         }
  271.     };
  272.     
  273.     struct CirioNubLookupSymEntryResultRep
  274.     LookupSymEntryByName(
  275.         char *sym,
  276.         bool caseSensitive,
  277.         bool externOnly,
  278.         int numToSkip
  279.     );
  280. */
  281.  
  282. extern CirioNubRetCode
  283. CirioNubServeLookupSymEntryByName( );
  284.  
  285. #define CirioNubProcID_LookupSymEntryByName        21
  286.  
  287.  
  288. /*
  289.     struct LookupSymEntryResult
  290.     LookupSymEntryByValue( unsigned val, int numToSkip );
  291.  
  292.     (numToSkip == 0) ~ GetLatestByValue
  293.     (numToSkip > 0) ~ GetNextByValue
  294.     (numToSkip < 0) ~ GetPrevByValue
  295. */
  296.  
  297. extern CirioNubRetCode
  298. CirioNubServeLookupSymEntryByValue( );
  299.  
  300. #define CirioNubProcID_LookupSymEntryByValue        22
  301.  
  302.  
  303. /*
  304.     struct LookupSymEntryResult
  305.     LookupSymEntryByID( unsigned symID );
  306. */
  307.  
  308. extern CirioNubRetCode
  309. CirioNubServeLookupSymEntryByID( );
  310.  
  311. #define CirioNubProcID_LookupSymEntryByID        23
  312.  
  313.  
  314. /*
  315.     struct LookupSymEntryResult
  316.     SkipSymEntryByName(
  317.         unsigned symID,
  318.         bool caseSensitive,
  319.         bool externOnly,
  320.         int numToSkip
  321.     );
  322. */
  323.  
  324. extern CirioNubRetCode
  325. CirioNubServeSkipSymEntryByName( );
  326.  
  327. #define CirioNubProcID_SkipSymEntryByName        24
  328.  
  329.  
  330. /*
  331.     struct LookupSymEntryResult
  332.     SkipSymEntryByValue( unsigned symID, int numToSkip );
  333.  
  334.     (numToSkip > 0) ~ GetNextByValue
  335.     (numToSkip < 0) ~ GetPrevByValue
  336. */
  337.  
  338. extern CirioNubRetCode
  339. CirioNubServeSkipSymEntryByValue( );
  340.  
  341. #define CirioNubProcID_SkipSymEntryByValue        25
  342.  
  343.  
  344. /*
  345.     END of the group of obsolete procedures.
  346. */
  347.  
  348.  
  349.  
  350. /*
  351.     struct LookupSymEntryResult
  352.     GetMatchingSymEntryByName(
  353.         unsigned symID,
  354.         char *pattern,
  355.         bool caseSensitive,
  356.         unsigned wantedTypes,
  357.         unsigned ignoredClasses,
  358.         int numToSkip
  359.     );
  360.  
  361.     Like XR_ILGetMatchingSymEntryByName
  362. */
  363.  
  364. extern CirioNubRetCode
  365. CirioNubServeGetMatchingSymEntryByName( );
  366.  
  367. #define CirioNubProcID_GetMatchingSymEntryByName    26
  368.  
  369.  
  370.  
  371. /*
  372.     struct LookupSymEntryResult
  373.     GetMatchingSymEntryByValue(
  374.         unsigned symID,
  375.         unsigned val,
  376.         unsigned wantedTypes,
  377.         unsigned ignoredClasses,
  378.         int numToSkip
  379.     );
  380.  
  381.     Like XR_ILGetMatchingSymEntryByValue
  382. */
  383.  
  384. extern CirioNubRetCode
  385. CirioNubServeGetMatchingSymEntryByValue( );
  386.  
  387. #define CirioNubProcID_GetMatchingSymEntryByValue    27
  388.  
  389.  
  390. /*
  391.     unsigned GetMaxThreads ( );
  392.  
  393.     Return max number of threads supported
  394.         (This is 1 greater than max allowable thread index)
  395. */
  396.  
  397. extern CirioNubRetCode
  398. CirioNubServeGetMaxThreads( );
  399.  
  400. #define CirioNubProcID_GetMaxThreads            28
  401.  
  402. /*
  403.     struct CirioNubThreadDataRep
  404.         GetThreadFromCTRep ( struct XR_CTRep ctr );
  405.  
  406.     Return a struct CirioNubThreadDataRep for specified thread on debuggee.
  407. */
  408.  
  409.  
  410. extern CirioNubRetCode
  411. CirioNubServeGetThreadFromCTRep( );
  412.  
  413. #define CirioNubProcID_GetThreadFromCTRep        29
  414.  
  415.  
  416. /*
  417.     struct CirioNubInstrSetAndOpSysRep
  418.         GetInstrSetAndOpSys( );
  419.  
  420.     Return a struct CirioNubInstrSetAndOpSysRep identifying debuggee's
  421.         instruction set and operating system.
  422.     These are represented as agreed-upon strings.
  423. */
  424.  
  425. extern CirioNubRetCode
  426. CirioNubServeGetInstrSetAndOpSys( );
  427.  
  428. #define CirioNubProcID_GetInstrSetAndOpSys        30
  429.  
  430.  
  431.  
  432. #define CirioNubProcID_Last            30
  433.  
  434. #endif /* _CIRIO_NUB_PROCS_ */
  435.  
  436.